<%--list page --%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript">
	
</script>
</head>

<body>
<center>	
	<table border=0 width=600 cellpadding="0" cellspacing="0">
		<tr>
			<td colspan="5"><hr width="600" color="#d5d5d5" size="3"></td>
		</tr>
		<tr>
			<th width="10%">번호</th>
			<th width="40%">제목</th>
			<th width="15%">작성자</th>
			<th width="25%">작성일</th>
			<th width="10%">조회수</th>
		</tr>	
		<tr>
			<td colspan="5"><hr width="600" color="#d5d5d5" size="1"></td>
		</tr>
		
		<s:iterator value="list">
			<tr>
				<td width="10%">${rownum }</td>
				<td width="40%"><s:a href="../board/bbcontent.do?no=%{no}&jsptype=%{jsptype}&page=%{curpage}&ono=%{ono}" theme="ajax" targets="blogcontent">${subject }<s:if test="boardtype==1">&nbsp;&nbsp;&nbsp;(${r_count })</s:if></s:a></td>
				<td width="15%">${id }</td>
				<td width="25%"><s:date name="writeday" format="yyyy-MM-dd"/> </td>
				<td width="10%">${readnum }</td>
			</tr>
			<tr>
				<td colspan="5"><hr width="600" color="#d5d5d5" size="1"></td>
			</tr>
		</s:iterator>
	</table>
	
	<!-- 메뉴 검색 찾기 -->
	<table	border=0 width=600 cellpadding="5">
		<tr>
			<td align="left">
				<s:if test="#session.login != null">
					<s:a href="../board/bbinsert.do?jsptype=%{jsptype}&ono=%{ono}&page=%{curpage}" theme="ajax" targets="blogcontent">
						글쓰기
					</s:a>
				</s:if>
				<s:if test="#session.login == null">
					<a href="javascript:alert('로그인을 해주세요')">
						글쓰기
					</a>
				</s:if>
			</td>
			<td align="right">
			
			<s:a href="../board/boardselect.do?ono=%{ono}&jsptype=%{jsptype}&page=%{curpage>1?curpage-1:curpage}" theme="ajax" targets="blogcontent">
			<img src="../../image/board/left_arrow.png" border=0></s:a>
			
			<c:forEach var="i" begin="1" end="${totalpage }">
				<s:url id="pURL" action="boardselect" namespace="/user/blog/board">
				<s:param name="page">${i }</s:param>
				<s:param name="jsptype">${jsptype }</s:param>
				<s:param name="ono">${ono }</s:param>
				</s:url>
				<s:a href="%{pURL}" theme="ajax" targets="blogcontent">${i}</s:a>
			</c:forEach>
			
			<s:a href="../board/boardselect.do?ono=%{ono}&jsptype=%{jsptype}&page=%{curpage<totalpage?curpage+1:curpage }" theme="ajax" targets="blogcontent">
			<img src="../../image/board/right_arrow.png" border=0></s:a>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				&nbsp;
			</td>
		</tr>
	</table>
	</center>
</body>
</html>